package com.runa.rccprotocol.dto.thtf;

import com.runa.protocol.dto.DtuReportAck;
import com.runa.protocol.util.ByteUtil;

public class THTFReportAck extends DtuReportAck {

    public THTFReportAck(String netEquNo) {
        String dataStr="68 00 0C B2 B8 2A 9E 63 2B 71 57 16";
        dataStr=dataStr.replace("B8 2A 9E 63 2B 71",netEquNo);
        this.data = ByteUtil.hexStringToByte(dataStr);
        data[data.length-2] = ByteUtil.sum(data, 1, data.length-3);
    }

    public static void main(String[] args) {
        THTFReportAck deBaoReportAck = new THTFReportAck("F4 D4 3B EA A9 52");
        System.out.println(ByteUtil.byteToHexString(deBaoReportAck.getData()));
        System.out.println(new String(ByteUtil.hexStringToBytes("42 45 41 54")));
    }
}
